Repository navigation
feat: populate SymbolInformation.signature_documentation - #549
Merged
Merged
Conversation
Signatures used to be rendered as a ```ts code block at the start of SymbolInformation.documentation. They now go in the structured signature_documentation field (language "typescript"), and documentation holds only docstrings, as scip.proto asks new indexers to do. Sourcegraph's hover renders signature_documentation as a code block before documentation, so keeping both would show the signature twice. Consumers that read only documentation will no longer see signatures. Amp-Thread-ID: https://ampcode.com/threads/T-01a1cefb-43ef-72b1-9eea-3323b0b1f550 Co-authored-by: Amp <amp@ampcode.com>
emidoots
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scip-typescript has always rendered a symbol's signature as a
```tscode block at the start ofSymbolInformation.documentation. scip.proto has a structuredsignature_documentationfield for this and asks new indexers to keep only docstrings indocumentation. This moves signatures (including themodule "…"signature of file symbols) intosignature_documentationwith languagetypescript, which is TypeScript syntax even for JS and Svelte sources, sodocumentationnow holds only JSDoc text.Moving rather than duplicating is deliberate: Sourcegraph's hover (
symbolHoverText) renderssignature_documentationas a code block and then appendsdocumentation, so emitting both would show the signature twice. Sourcegraph has read the field since at least 2024. Consumers that read onlydocumentationwill no longer see signatures. Signatureoccurrences(clickable types) are left for a follow-up.Test plan
Snapshot outputs with
showDocsnow printsignature_documentationlines instead of the code blocks. Also decoded indexes for thesyntaxandreactfixtures: every symbol has a signature, and nodocumentationentry contains a code block.